namespace Ray.Web
{
    using Castle.MonoRail.Framework;
    using Castle.ActiveRecord;
    using Castle.ActiveRecord.Framework.Config;
    using System.Web.UI;
    using System;
    using System.Web;
    using log4net;

    using Ray.Web.Models;


	public class GlobalApplication : HttpApplication
	{
        private static readonly ILog log = LogManager.GetLogger(typeof(GlobalApplication));

		public GlobalApplication()
		{
            
		}

		public void Application_OnStart()
		{
            //XmlConfigurationSource source = new XmlConfigurationSource(System.Web.HttpContext.Current.Request.MapPath("appconfig.xml"));
            ActiveRecordStarter.Initialize(ActiveRecordSectionHandler.Instance, typeof(Ray_Column), typeof(Ray_Master), typeof(Ray_Content));
            log4net.Config.XmlConfigurator.Configure();
            log.Error("Unable to connect to database.", new Exception("test"));
		}

		public void Application_OnEnd() 
		{
		}
	}
}
